package cc.vv.btpartyjob.partymanager.delegate

import android.view.View
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.mvp.delegate.BaseAppDelegate

/**
 * 四支队伍托管类
 * Created by Chen.qi on 2018/10/27.
 */
class FourTeamsActivityDelegate : BaseAppDelegate() {

    override fun initWidget() {

    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_four_teams
    }

    /**设置标题title*/
    fun setTopBarTitle(topBarTitle: String?) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_aftV_topBar)
        titleBar?.setTitle(topBarTitle)
    }

    fun showRight(isShow: Boolean = false) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_aftV_topBar)
        if (isShow) {
            titleBar?.rl_ljtb_right_layout?.visibility = View.VISIBLE
        } else {
            titleBar?.rl_ljtb_right_layout?.visibility = View.GONE
        }
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_aftV_topBar)
        titleBar?.setEventInterface(event)
    }

}